---
category: Level 1 — Basic
created: '2020-03-15'
keywords: 'navigator.platform, check mac browser'
title: Detect mac OS browser
---

Check if the current browser runs on Mac:

```js
const isMacBrowser = /Mac|iPod|iPhone|iPad/.test(navigator.platform);
```

## See also

-   [Check if the code is running in the browser](https://phuoc.ng/collection/html-dom/check-if-the-code-is-running-in-the-browser/)
-   [Detect if the caps lock is on](https://phuoc.ng/collection/html-dom/detect-if-the-caps-lock-is-on/)
-   [Detect internet explorer browser](https://phuoc.ng/collection/html-dom/detect-internet-explorer-browser/)
-   [Detect mobile browsers](https://phuoc.ng/collection/html-dom/detect-mobile-browsers/)
